package com.vip.mvc.demo.testAsyn.controller;

import com.vip.mvc.annotation.Controller;
import com.vip.mvc.annotation.RequestMapping;
import com.vip.mvc.annotation.RequestMethod;
import com.vip.mvc.annotation.ResponseBody;
import com.vip.mvc.demo.testAsyn.msg.TestResp;

import java.io.IOException;

/**
 * Created by cloudy.xie on 17/1/20.
 */
@Controller
public class TestController {
    @ResponseBody
    @RequestMapping(value="/asynTestJson",method = RequestMethod.POST)
    public String testJson() throws IOException {
        return "testest";
    }

    @ResponseBody
    @RequestMapping(value="/asynTestObj",method = RequestMethod.POST)
    public TestResp testObj() throws IOException {
        return new TestResp(1,"testname-中文");
    }

}
